import book.BookList;
import user.AdminUser;
import user.NormalUser;
import user.User;

import java.util.Scanner;

public class Main {
    static void login () {
        System.out.print("请输入你的名字:");
        Scanner sc = new Scanner(System.in);
        String name = sc.nextLine();
        System.out.print("请输入你的身份: 1.管理员 2.普通用户 ->");
        int choice = sc.nextInt();
        BookList bookList = new BookList();
        while(true) {
            if(choice == 1) {
                User user = new AdminUser(name);
                int pow = user.menu();
                user.fun_sel(pow,bookList);
            }else {
                User user = new NormalUser(name);
                int pow = user.menu();
                user.fun_sel(pow,bookList);
            }
        }
    }
    public static void main(String[] args) {
        login();
    }
}
